<?php

get_header();

echo '<div id="content" class="widecolumn">' . "\n";

if ( have_posts() )
{
	while ( have_posts() )
	{
		the_post();
		
		echo '<div class="post" id="post-' . get_the_ID() . '">' . "\n";
		echo '	<h2><a href="' . get_permalink($post->post_parent) . '" rev="attachment">' . get_the_title($post->post_parent) . '</a> &raquo; ' . the_title( '', '', false) . '</h2>' . "\n";
		echo '	<div class="entry">' . "\n";
		echo '		<p class="attachment"><a href="' . wp_get_attachment_url($post->ID) . '">' . wp_get_attachment_image( $post->ID, 'medium' ) . '</a></p>' . "\n";
		echo '		<div class="caption">' . "\n";
		
	  // this is the "caption"
		if ( !empty($post->post_excerpt) )
		{
			the_excerpt();
		}

		echo '		</div>' . "\n";
		
    the_content('<p class="serif">' . __('Read the rest of this entry &raquo;', 'german_newspaper') . '</p>');
    wp_link_pages(array('before' => '<p><strong>' . __('Pages:', 'german_newspaper') . '</strong> ', 'after' => '</p>', 'next_or_number' => 'number'));

		echo '		<div class="navigation">' . "\n";
		echo '			<div class="alignleft">' . "\n";
		previous_image_link();
		echo '			</div>' . "\n";
		echo '			<div class="alignright">' . "\n";
		next_image_link();
		echo '			</div>' . "\n";
		echo '		</div>' . "\n";
		echo '		<br class="clear" />' . "\n";
		echo '		<p class="postmetadata alt">' . "\n";
		echo '			<small>' . "\n";
		printf(__('This entry was posted on %1$s at %2$s and is filed under %3$s.', 'german_newspaper'),  get_the_time(__('l, F jS, Y', 'german_newspaper')), get_the_time(), get_the_category_list(', '));
    the_taxonomies();
    printf(__(' You can follow any responses to this entry through the <a href="%s"><span class="rss_symbol"></span>RSS 2.0</a> feed.', 'german_newspaper'), get_post_comments_feed_link());

		if ( ('open' == $post->comment_status) && ('open' == $post->ping_status) )
		{
			// Both Comments and Pings are open
			printf(__(' You can <a href="#respond">leave a response</a>, or <a href="%s" rel="trackback">trackback</a> from your own site.', 'german_newspaper'), get_trackback_url());
    }
		elseif (!('open' == $post->comment_status) && ('open' == $post->ping_status))
		{
			// Only Pings are Open
			printf(__(' Responses are currently closed, but you can <a href="%s" rel="trackback">trackback</a> from your own site.', 'german_newspaper'), get_trackback_url());
    }
		elseif (('open' == $post->comment_status) && !('open' == $post->ping_status))
		{
			// Comments are open, Pings are not
			_e(' You can skip to the end and leave a response. Pinging is currently not allowed.', 'german_newspaper');
    }
		elseif (!('open' == $post->comment_status) && !('open' == $post->ping_status))
		{
			// Neither Comments, nor Pings are open
			_e(' Both comments and pings are currently closed.', 'german_newspaper');
    }

		edit_post_link(__(' Edit this entry.', 'german_newspaper'),'','');

		echo '			</small>' . "\n";
		echo '		</p>' . "\n";
		echo '	</div>' . "\n";
		echo '</div>' . "\n\n";

		comments_template();
	}
}
else
{
	echo '<p>' . __('Sorry, no posts matched your criteria.', 'german_newspaper') . '</p>' . "\n";
}

echo '</div>' . "\n\n";



get_footer();


?>